<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="font/iconfont.css">
    <link rel="stylesheet" href="font1/iconfont.css">
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            display: flex;
        }

        .box .left {
            height: 800px;
            width: 200px;
            background-color: rgb(53, 58, 64);
        }

        .box .left .row1,
        .box .left .row2 {
            box-sizing: border-box;
            padding-left: 20px;
            font-size: 14px;
            height: 50px;
            width: 100%;
            color: white;
            line-height: 60px;
            border-bottom: 1px solid gray;
        }

        .box .left .icon-tianmaomendianziti,
        .box .left .icon-renwu-02 {
            font-size: 24px;
        }

        .box .left select {
            margin-left: 10px;
            margin-top: 10px;
            height: 28px;
            border-radius: 5px;
            background-color: rgb(21, 126, 251);
            width: 90%;
            color: white;
            font-size: 16px;
            padding-left: 20px;

        }

        .box .left .v1,
        .box .left .v2,
        .box .left .v3,
        .wid,
        .charts {
            height: 26px;
            color: rgb(216, 198, 198);
            text-align: center;
            line-height: 26px;
            margin-top: 20px;
            width: 86%;
            padding-left: 10px;
            margin-left: 10px;
            border-radius: 10px;
            text-align: left;
        }

        .box .left .v3 {
            background-color: rgb(236, 236, 236);
            color: #000;

        }

        .box .left .wid .new,
        .box .left .charts .arrow {
            display: inline-block;
            height: 20px;
            line-height: 20px;
            font-size: 14px;
            border-radius: 5px;
            margin-left: 26px;
            color: white;
            background-color: red;
            width: 46px;
            text-align: center;
            font-weight: bold;
        }

        .box .left .charts .arrow {
            background-color: transparent;
            margin-left: 30px;

        }

        .EX {
            font-size: 12px;
            margin-top: 10px;
        }

        .two {
            display: inline-block;
            width: 20px;
            height: 20px;
            background-color: rgb(64, 145, 164);
            text-align: center;
            border-radius: 8px;
            line-height: 20px;
            margin-left: 40px;

        }

        .box .right {
            flex: 1;
            background-color: rgb(244, 248, 248);
        }

        .box .right .nav {
            box-sizing: border-box;
            height: 50px;
            line-height: 50px;
            padding: 0px 20px;
            background-color: white;
        }

        .box .right .home,
        .box .right .Contact,
        .box .right input {
            margin-left: 30px;
        }

        .box .right input {
            background-color: rgb(243, 244, 246);
            height: 20px;
            border: none;
            border-radius: 4px;
            padding-left: 10px;
        }

        .box .right .dash {
            padding: 10px 20px;
            height: 50px;
            display: flex;
            justify-content: space-between;

        }

        .box .right .tu {
            display: flex;
            justify-content: space-around;
            flex-wrap: wrap;
        }

        .box .right .tu div {
            margin-bottom: 10px;
            width: 45%;
            height: 400px;
            background-color: white;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="left">
            <div class="row1">
                <span class="iconfont icon-tianmaomendianziti"></span>
                <span>AdminLTE 3</span>
            </div>
            <div class="row2">
                <span class="iconfont icon-renwu-02"></span>
                <span>Alexander Pierce</span>
            </div>
            <select name="" id="">
                <option value="">Dashboard</option>
            </select>
            <div class="v1">
                <span class="iconfont icon-quan"></span>
                <span>Dashboard v1</span>
            </div>
            <div class="v2">
                <span class="iconfont icon-quan"></span>
                <span>Dashboard v2</span>
            </div>
            <div class="v3">
                <span class="iconfont icon-quan"></span>
                <span>Dashboard v3</span>
            </div>
            <div class="wid">
                <span class="iconfont icon-jiugongge"></span>
                <span class="text">Widgets</span>
                <span class="new">New</span>
            </div>
            <div class="charts">
                <span class="iconfont icon-a-bingzhuangtubaifenbitongji"></span>
                <span class="text">Widgets</span>
                <span class="arrow">&lt;</span>
            </div>
            <div class="charts">
                <span class="iconfont icon-shu1"></span>
                <span class="text">UIEleme</span>
                <span class="arrow">&lt;</span>
            </div>
            <div class="charts">
                <span class="iconfont icon-jiludanzilishijilu"></span>
                <span class="text">Forms&emsp;</span>
                <span class="arrow">&lt;</span>
            </div>
            <div class="charts">
                <span class="iconfont icon-jisuanqi"></span>
                <span class="text">Tables&emsp;</span>
                <span class="arrow">&lt;</span>
            </div>
            <div class="charts">
                <span class="EX">EXAMPLES</span>
            </div>
            <div class="charts">
                <span class="iconfont icon-rili"></span>
                <span class="text">Calender</span>
                <span class="two">2</span>
            </div>
            <div class="charts">
                <span class="iconfont icon-youjian"></span>
                <span class="text">Mailbox </span>
                <span class="arrow">&lt;</span>
            </div>
            <div class="charts">
                <span class="iconfont icon-shu"></span>
                <span class="text">Pages&emsp;</span>
                <span class="arrow">&lt;</span>
            </div>
            <div class="charts">
                <span class="iconfont icon-jiahaozhankai"></span>
                <span class="text">Extras&emsp;</span>
                <span class="arrow">&lt;</span>
            </div>

        </div>
        <div class="right">
            <div class="nav" style="position: relative;">
                <span class="iconfont icon-gengduo"></span>
                <span class="home">Home</span>
                <span class="Contact">Contact</span>
                <input type="search" placeholder="Search"><span class="iconfont icon-fangdajing"
                    style="font-size:10px;position: absolute;left: 410px;top: 2px;"></span>

            </div>
            <div class="dash">
                <span>Dashboard v3</span>
                <span><span style="color:blue;">Home</span>/ Dashboard v3</span>
            </div>
            <div class="tu">
                <div class="online"></div>
                <div class="sales"></div>
                <div class="products">
                    <p style="font-weight: bold;font-size: 25px;">Products</p>
                    <table>
                        <thead>
                            <tr>
                                <th>Product</th>
                                <th>Price</th>
                                <th>Sales</th>
                                <th>More</th>
                            </tr>
                        </thead>
                        <tbody>
                            <!-- <tr >
                            <td >Some Product</td>
                            <td>13 USD</td>
                            <td>12,000Sold</td>
                            <td><span class="iconfont icon-sousuo"></span></td>
                        </tr>
                        <tr>
                            <td >Some Product</td>
                            <td>13 USD</td>
                            <td>12,000Sold</td>
                            <td><span class="iconfont icon-sousuo"></td>
                        </tr> -->
                        </tbody>
                    </table>
                </div>
                <div class="overview"></div>

            </div>



        </div>
    </div>
</body>

</html>
<script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.4.0/echarts.js"></script>
<script src="./promise-ajax.js"></script>
<script src="./mock.js"></script>
<script src="./mockdata.js"></script>
<script>
    var online = document.querySelector('.box .right .tu .online');
    var sales = document.querySelector('.box .right .tu .sales');
    var e = echarts.init(online);
    var e1 = echarts.init(sales)

    //2.绘制图表
    e.setOption({
        title: {
            text: 'Online Store Visitors',
        },
        legend: {
            top: 25,
        },
        xAxis: {
            data: ['18th', '20th', '22th', '24th', '26th', '28th', '30th'],

        },
        yAxis: {
            splitLine: {
                show: true
            }
        },
        series: [{
                showBackground: true,
                smooth: true,
                name: 'this week',
                type: 'line',
                data: [100, 120, 170, 160, 180, 180, 170]
            },
            {
                type: 'line',
                data: [60, 80, 70, 65, 80, 80, 80, 90],
                symbolSize: 5,
                symbol: 'circle',
                color: 'blue',
                smooth: true,
                name: 'last week',
                itemStyle: {
                    normal: {
                        color: '#188df0',
                        borderWidth: 2,
                        color: 'rgb(207,212,217)',
                        borderColor: 'white',
                        lineStyle: {
                            width: 2
                        },
                        shadowBlur: 5,
                        shadowColor: '#000'

                    }
                }

            }

        ]
    });

    e1.setOption({
        title: {
            text: 'Online Store Visitors',
        },
        legend: {
            top: 25,
        },
        xAxis: {
            data: ['JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'],

        },
        yAxis: {

            splitLine: {
                show: true

            }
        },
        series: [{
                showBackground: true,
                smooth: true,
                name: 'this year',
                type: 'bar',
                data: [1, 2, 3, 2.5, 2.7, 2.5, 3]
            },
            {
                type: 'bar',
                data: [0.8, 1.8, 2.8, 2, 1.9, 1.9, 1.8, 2],
                symbolSize: 5,
                symbol: 'circle',
                color: 'blue',
                smooth: true,
                name: 'last year',
                itemStyle: {
                    normal: {

                        color: 'rgb(207,212,217)',
                        lineStyle: {
                            width: 2
                        },
                        shadowColor: '#000'

                    }
                }

            }

        ]
    });

    render(data.list)

    //渲染表格数据
    function render(data) {
        var str = data.map((item, index) => {
            return `<tr>
                    <td>${item.email}</td>
                    <td>${item.name}</td>
                    <td>${item.phone}</td>
                    <td>${item.ingroup}</td>
                    <td>${item.isadmin?'是':'否'}</td>
                    <td> <button class="btn">${item.status?'正常':'异常'}</button> </td>
                    <td> <button>编辑</button> <button>删除</button> </td>
                </tr>`
        }).join('')
        document.querySelector('tbody').innerHTML = str;
    }
</script>
</script>